<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<#include "lib/lib.html" />
<title>提款</title>
</head>
<body>
<div class="pd-20">
	<form action="${basePath}/property/drawing.do" method="post"  class="form form-horizontal" id="form-area-add">
		<input type="hidden" name="id" value="${id}"/>
		<input type="hidden" id="exBalance" value="${balance}"/>
		<div class="row cl">
			<label class="form-label col-3"><span class="c-red">*</span>提款金额：</label>
			<div class="formControls col-5">
				<input type="text" class="input-text"  id="balance" name="balance">
			</div>
			<div class="col-4"> </div>
		</div>
		
		<div class="row cl">
			<div class="col-9 col-offset-3">
				<button type="button" onclick="submitBtn()" class="btn btn-success radius" id="admin-role-save" name="admin-role-save">
						<i class="icon-ok"></i> 确定
				</button>
			</div>
		</div>
	</form>
</div>
<script type="text/javascript">
function submitBtn(){
	var exBalance = $("#exBalance").val();
	var balance = $("#balance").val();
	if(balance == ""){
		layer.msg('请输入要提款的金额', {
			icon : 1,
			time : 1000
		});
		return ;
	}
	if(balance > exBalance){
		layer.msg('提款金额不能大于总额', {
			icon : 1,
			time : 1000
		});
		return ;
	}
	$("#form-area-add").ajaxForm({
		success:function(data) {
			if(data == 200){
				layer.msg('修改成功!', {icon: 6,time:1000});
				window.parent.location.href="${basePath}/property/listAdu.do";
			}else{
				layer.msg("修改异常", {icon: 5,time:1000});
			}
		},      
		dataType:"json"   
	}).submit(); 	
}
</script>
</body>
</html>